void Clock()
{
  if(lastTick == 0 || millis() < lastTick)
  {
    lastTick = millis();
  }
  // move forward one second every 1000 milliseconds
  unsigned long diff = millis() - lastTick;
  if (diff >= ticksInSecond) 
  {
    lastTick = millis() - (diff - ticksInSecond);
    seconds++;
    secondsTick = !secondsTick;
    if(seconds >= 60) 
    {
      if(snooze > 0)
      {
        snooze--;
      }
      minutesLittle++;
      seconds = 0;
      if (minutesLittle >=10) 
      {
        minutesBig++;
        minutesLittle = 0;
        if(minutesBig >= 6)
        {
          hoursLittle++;
          minutesBig = 0; 
          if (hoursLittle >= 10) 
          {
            hoursBig++;
            hoursLittle = 0;
          }
          if(is24Hour && hoursBig >= 2 && hoursLittle >= 5)
          {
            hoursBig = 0;
            hoursLittle = 1;
          }
          else if(!is24Hour && hoursBig >= 1 && hoursLittle >=3)
          {
            hoursBig = 0;
            hoursLittle = 1;
          }
        }
      }
    }
  }
}

